//
//  DWMessageManger.h
//  LGMessageAccept
//
//  Created by dangwc on 2019/9/5.
//  Copyright © 2019 dangwc. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DWMessageRequest.h"

#define DWREFRESHMESSAGEDATA @"DWREFRESHMESSAGEDATA"

NS_ASSUME_NONNULL_BEGIN

@interface DWMessageManger : NSObject

/**
 单例初始化

 @return 单例
 */
+(instancetype)shareManager;

/**
 轮询请求的参数
 */
@property (nonatomic,copy) NSString *userID;

/**
 子服务器地址
 */
@property (nonatomic,copy) NSString *subUrl;

/**
 轮询间隔时间，默认10秒
 */
@property (nonatomic,assign)  NSInteger pollInterval;

/**
 开启轮询
 */
-(void)startPolling;


/**
 停止轮询
 */
-(void)stopPolling;

/**
 定时器
 */
@property (nonatomic,strong) dispatch_source_t  timer;
@end

NS_ASSUME_NONNULL_END
